import * as apiService from '@/services/api';

/**
 * vip获取等级设置
 * @param {params}
 * @returns {*} Promise
 *
 */
export const getVipLevelConfig = params => apiService.post(api.GET_VIP_LEVEL_CONFIG, params);

/**
 * vip保存等级设置
 * @param {params}
 * @returns {*} Promise
 *
 */
export const saveVipLevelConfig = params => apiService.post(api.SAVE_VIP_LEVEL_CONFIG, params);


/**
 * vip获取奖励设置
 * @param {params}
 * @returns {*} Promise
 *
 */
export const getVipAwardConfig = params => apiService.post(api.GET_VIP_AWARD_CONFIG, params);

/**
 * vip保存奖励设置
 * @param {params}
 * @returns {*} Promise
 *
 */
export const saveVipAwardConfig = params => apiService.post(api.SAVE_VIP_AWARD_CONFIG, params);

/**
 * vip获取等级修改记录
 * @param {params}
 * @returns {*} Promise
 *
 */
export const vipModifyRecord = ({
  modifyTimeStart, modifyTimeEnd, username, vipLevelBefore, vipLevelAfter, optType, operator, page, size,
}) => apiService.post(api.VIP_MODIFY_RECORD, {
  modifyTimeStart, modifyTimeEnd, username, vipLevelBefore, vipLevelAfter, optType, operator, page, size,
});

/**
 * vip获取等级修改记录
 * @param {params}
 * @returns {*} Promise
 *
 */
export const vipGiveRewardRecord = ({
  dateType, startDate, endDate, username, vipLevel, awardType, status, page, size,
}) => apiService.post(api.VIP_GIVE_REWARD_RECORD, {
  dateType, startDate, endDate, username, vipLevel, awardType, status, page, size,
});
